package com.example.library.controller;

import com.example.library.bean.response.Response;
import com.example.library.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/banner")
public class BannerAPI {

    @Autowired
    private BannerService bannerService;

    @GetMapping("/getHot")
    public Response getHot() {
        return bannerService.getAllByType(1);
    }

}
